import { BaseComponent, triggerManager, BaseComponentProps, emojiPlayerModel } from 'orionos-eve-core';
import { observer } from 'mobx-react';
import React from 'react'
import { Text, View, Button, StyleSheet } from 'react-native';
import { BigeyesTrigger } from './BigeyesTrigger';
import { BigeyesViewModel } from './BigeyesViewModel';
import { BigeyesVoice } from './BigeyesVoice';

triggerManager.addTrigger(new BigeyesTrigger());

@observer
export class BigeyesScreen extends BaseComponent<BaseComponentProps, BigeyesViewModel,BigeyesVoice>{
    public viewModel: BigeyesViewModel
    public constructor(props: BaseComponentProps){
        super(props)
        // emojiPlayerModel.setShow(true)
        this.viewModel = new BigeyesViewModel()
        let voice = new BigeyesVoice(this.viewModel)
        this.setViewModel(this.viewModel)
        this.setVoice(voice)
    }
    public componentDidMount() {
        //重写界面的didMount，必须调用super
        super.componentDidMount();
    }

    public componentWillMount() {
    }

    public componentWillUnmount() {
        //重写界面的Unmount，必须调用super
        super.componentWillUnmount();
    }
    public render() {
        return (
            <View style={{width: '100%',height: '100%'}}>
                <Button title="totaskess" onPress={()=>{this.viewModel.tobook()}}></Button>
            </View>
        )
    }
    
}